# 时间参数
ds=$1

# 采集数据
sqoop import \
--delete-target-dir \
--connect jdbc:mysql://cdh01:3306/traffic \
--username root \
--password 'shujia666888..' \
--query "select * from base_bd_vehicle where  \$CONDITIONS" \
--target-dir /daas/motl/traffic/ods/ods_base_bd_vehicle/ds=$ds \
--fields-terminated-by ',' \
-m 1


# 增加分区
hive -e "alter table ods.ods_base_bd_vehicle add if not exists partition(ds='$ds');"
